'use strict';

/**
 * Created by zhu on 14/12/26.
 */
var commentServices = angular.module('comment');

commentServices.factory('CommentQueryService', ['$resource', 'RootPathConstant', function ($resource, RootPathConstant) {
    return $resource(RootPathConstant + '/comment/host/:hostId?countPerPage=:countPerPage&offset=:offset&type=:type', {}, {
        query: {method: 'GET', isArray: false}
    });
}]);

commentServices.factory('CommentModifyService', ['$resource', 'RootPathConstant', function ($resource, RootPathConstant) {
    return $resource(RootPathConstant + '/comment/:commentId', {}, {
        add: {method: 'POST'},
        change: {method: 'PUT'},
        remove: {method: 'DELETE'}
    });
}]);
